    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
        data
    })
};
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUser',
        method: 'post',
        data
    })
};
export const deleteUserAll = (data:any) => {
    return service({
        url: '/user/index/deleteUserAll',
        method: 'post',
        data
    })
};
export const checkUser = (data:any) => {
    return service({
        url: '/user/index/checkUser',
        method: 'post',
        data
    })
};
export const getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
export const updateBrandStatus = (data:any) => {
    return service({
        url: '/shop/index/updateBrandStatus',
        method: 'post',
        data
    })
};
export const addBrand = (data:any) => {
    return service({
        url: '/shop/index/addBrand',
        method: 'post',
        data
    })
};
export const getMenuTree = () => {
    return service({
        url: '/user/index/getMenuTree',
        method: 'post',
        
    })
};
export const deleteUserById = (userId:number) => {
    return service({
        url: '/user/index/deleteUserById/'+userId,
        method: 'post',
        
    })
};
export const getTypeTree = () => {
    return service({
        url: '/shop/type/getTypeTree',
        method: 'get',
        
    })
};
export const getTypeSelectTree = () => {
    return service({
        url: '/shop/type/getTypeSelectTree',
        method: 'get',
        
    })
};
export const deleteTypeById = (typeId:any) => {
    return service({
        url: '/user/index/deleteTypeById/'+typeId,
        method: 'post',
        
    })
};
export const setTypeStatus = (typeId:any,typeStatus:any) => {
    return service({
        url: '/shop/type/setTypeStatus/'+typeId+'/'+typeStatus,
        method: 'post',
        
    })
};
export const addType = (data:any) => {
    return service({
        url: '/shop/type/addType',
        method: 'post',
        data
    })
};
export const updateType = (data:any) => {
    return service({
        url: '/shop/type/updateType',
        method: 'post',
        data
    })
};
export const getProdList = (data:any) => {
    return service({
        url: '/shop/prod/getProdList',
        method: 'post',
        data
    })
};
export const addProd = (data:any) => {
    return service({
        url: '/shop/prod/addProd',
        method: 'post',
        data
    })
};
export const getBrandListAll = () => {
    return service({
        url: '/shop/brand/getBrandListAll',
        method: 'post',
        
    })
};
export const getApprListAll = () => {
    return service({
        url: '/shop/appr/getApprListAll',
        method: 'post',
        
    })
};
export const getTagListAll = () => {
    return service({
        url: '/shop/tag/getTagListAll',
        method: 'post',
        
    })
};
export const getUnitListAll = () => {
    return service({
        url: '/shop/unit/getUnitListAll',
        method: 'post',
        
    })
};
export const deleteProdAll = (data:any) => {
    return service({
        url: '/shop/prod/deleteProdAll',
        method: 'post',
        data
    })
};
